package com.example.cpsc.sc.Controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController

public class RouterController {

    @RequestMapping({"/","/index"})
    public String index(){
        return "index";
    }
    @RequestMapping({"/Tologin"})
    public String Tologin(){
        return "Tologin";
    }

    @RequestMapping({"/logout"})
    public String logout(){
        return "logout";
    }

    @RequestMapping({"/level1/{id}"})
    public String level1(@PathVariable("id") int id){
        return "level1/"+id;
    }
    @RequestMapping({"/level2/{id}"})
    public String level2(@PathVariable("id") int id){
        return "level2/"+id;
    }
    @RequestMapping({"/level3/{id}"})
    public String level3(@PathVariable("id") int id){
        return "level3/"+id;
    }

}
